package com.qbccn.bbs.vo;

import java.io.Serializable;
import lombok.Data;

/**
 * @author linke
 * @date 2020/8/1 16:33
 * @description
 */
@Data
public class TableResultVo<T> implements Serializable {

  private Integer code;
  private String message;
  private long count;
  private T data;

  public TableResultVo() {
    super();
  }

  public TableResultVo(Integer code) {
    super();
    this.code = code;
  }

  public TableResultVo(Integer code, String message) {
    super();
    this.code = code;
    this.message = message;
  }

  public TableResultVo(Integer code, String message, long count) {
    super();
    this.code = code;
    this.message = message;
    this.count = count;
  }

  public TableResultVo(Integer code, long count) {
    super();
    this.code = code;
    this.count = count;
  }

  public TableResultVo(Integer code, long count, T data) {
    super();
    this.code = code;
    this.count = count;
    this.data = data;
  }

  public TableResultVo(Integer code, String message, long count, T data) {
    super();
    this.code = code;
    this.message = message;
    this.count = count;
    this.data = data;
  }

  public TableResultVo(Integer code, Throwable throwable) {
    super();
    this.code = code;
    this.message = throwable.getMessage();
  }

  public TableResultVo(Integer code, T data) {
    super();
    this.code = code;
    this.data = data;
  }

  public TableResultVo(Integer code, String message, T data) {
    super();
    this.code = code;
    this.message = message;
    this.data = data;
  }
}
